body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    color: #eee;
    font-family: 'VT323', monospace;
    overflow: hidden;
    user-select: none;
}

#game-container {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

#left-panel, #middle-panel, #right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#left-panel {
    flex: 1;
    justify-content: center;
}

#middle-panel {
    flex: 1.5;
    justify-content: center;
    border-left: 2px solid #333;
    border-right: 2px solid #333;
    background: #1a1a1a;
}

#right-panel {
    flex: 1;
    justify-content: flex-start;
    position: relative;
}

#brain-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#brain-img {
    width: 300px;
    cursor: pointer;
    transition: transform 0.1s ease;
    filter: drop-shadow(0 0 15px #0f0);
}

#brain-img:hover {
    filter: drop-shadow(0 0 25px #0f0);
}

#brain-img:active {
    transform: scale(0.95);
}

#score-display {
    font-size: 6rem;
    color: #0f0;
    text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
}

#bps-display {
    font-size: 2rem;
    color: #0c0;
    margin-top: 10px;
}

#rebirth-info {
    font-size: 1.2rem;
    color: #aaa;
    margin-top: 20px;
}

#rebirth-button {
    display: block;
    margin-top: 15px;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    background-color: #8a2be2;
    color: #fff;
    border: 2px solid #4b0082;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px #fff;
}

#rebirth-button:hover {
    background-color: #9932cc;
    box-shadow: 0 0 15px #8a2be2;
}

#rebirth-button.disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    border-color: #333;
    text-shadow: none;
    box-shadow: none;
}

#superpower-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#superpower-button {
    padding: 15px 25px;
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #fff;
    border: 3px solid #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px #000, 0 0 10px #fff;
    animation: glow-animation 2s infinite alternate;
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff;
}

@keyframes glow-animation {
    from { box-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff; }
    to { box-shadow: 0 0 20px #ff00ff, 0 0 40px #00ffff; }
}

#superpower-button:hover:not(.disabled) {
    transform: scale(1.05);
}

#superpower-button.disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    border-color: #333;
    text-shadow: none;
    box-shadow: none;
    animation: none;
}

#superpower-status {
    display: none;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #0ff;
    border-radius: 5px;
    text-align: center;
    width: 80%;
}

#superpower-status p {
    margin: 5px 0;
    font-size: 1.2rem;
}

#superpower-status p:first-child {
    font-weight: bold;
    color: #0ff;
}

#middle-panel h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
}

#right-panel h2 {
    font-size: 2.5rem;
    color: #eee;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

#upgrades-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

/* Custom Scrollbar Styling */
#upgrades-container::-webkit-scrollbar {
    width: 12px;
}

#upgrades-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-left: 1px solid #333;
}

#upgrades-container::-webkit-scrollbar-thumb {
    background-color: #0f0;
    border-radius: 6px;
    border: 3px solid #1a1a1a;
}

.upgrade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #222;
    border: 2px solid #333;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.upgrade-item.disabled {
    cursor: not-allowed;
    background-color: #1a1a1a;
    color: #555;
    border-color: #222;
}

.upgrade-item:not(.disabled):hover {
    background-color: #333;
    border-color: #555;
}

.upgrade-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.upgrade-icon {
    width: 50px;
    height: 50px;
}

.upgrade-details h3 {
    margin: 0;
    font-size: 1.5rem;
}

.upgrade-details p {
    margin: 0;
    font-size: 1rem;
    color: #aaa;
}

.upgrade-item.disabled .upgrade-details p {
    color: #555;
}

.upgrade-cost {
    font-size: 1.5rem;
    color: #0f0;
}

.upgrade-count {
    font-size: 2rem;
    min-width: 40px;
    text-align: right;
    color: #fff;
}

.click-feedback {
    position: absolute;
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
}

@keyframes float-up {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

#music-credit {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.8rem;
    color: #555;
}